import VueRouter from 'vue-router';

export default new VueRouter({
    mode: 'hash',
    routes: [
        {
            path: '/',
            name: 'index',
            meta: {
                title: '首页'
            },
            component: (resolve) => require(['./views/index.vue'], resolve),
            children: [
                {
                    path: '/admin',
                    name: 'admin',
                    meta: {
                        title: '中台管理'
                    },
                    component: (resolve) => require(['./views/admin.vue'], resolve),
                    children: [
                        {
                            path: '/goods/archives/index',
                            name: 'goods-archives-index',
                            meta: {
                                title: '商品档案'
                            },
                            component: (resolve) => require(['./views/goods/archives/index'], resolve)
                        },
                        {
                            path: '/goods/evaluate/index',
                            name: 'goods-evaluate-index',
                            meta: {
                                title: '商品评价'
                            },
                            component: (resolve) => require(['./views/goods/evaluate/index'], resolve)
                        },
                        {
                            path: '/activity/flash-sale/index',
                            name: 'activity-flash-sale-index',
                            meta: {
                                title: '限时抢购'
                            },
                            component: (resolve) => require(['./views/activity/flash-sale/index'], resolve)
                        },
                        {
                            path: '/activity/flash-ad/index',
                            name: 'activity-flash-ad-index',
                            meta: {
                                title: '广告轮播'
                            },
                            component: (resolve) => require(['./views/activity/flash-ad/index'], resolve)
                        },
                        {
                            path: '/mall-order/index',
                            name: 'mall-order-index',
                            meta: {
                                title: '商品订单'
                            },
                            component: (resolve) => require(['./views/mall/mall-order/index'], resolve)
                        },
                        {
                            path: '/mall-order/sojourn-index',
                            name: 'mall-order-sojourn-index',
                            meta: {
                                title: '旅居订单'
                            },
                            component: (resolve) => require(['./views/mall/mall-order/sojourn-index'], resolve)
                        },
                        {
                            path: '/mall-order/property-index',
                            name: 'mall-order-property-index',
                            meta: {
                                title: '产权交易'
                            },
                            component: (resolve) => require(['./views/mall/mall-order/property-index'], resolve)
                        },
                        {
                            path: '/mall-express/index',
                            name: 'mall-express-index',
                            meta: {
                                title: '物流运单'
                            },
                            component: (resolve) => require(['./views/mall/mall-express/index'], resolve)
                        },
                        {
                            path: '/mall-refund/index',
                            name: 'mall-refund-index',
                            meta: {
                                title: '退货管理'
                            },
                            component: (resolve) => require(['./views/mall/mall-refund/index'], resolve)
                        },
                        {
                            path: '/goods/category/index',
                            name: 'goods-category-index',
                            meta: {
                                title: '商品分类'
                            },
                            component: (resolve) => require(['./views/goods/category/index'], resolve)
                        },
                        {
                            path: '/goods/property/index',
                            name: 'goods-property-index',
                            meta: {
                                title: '产权交易'
                            },
                            component: (resolve) => require(['./views/goods/property/index'], resolve)
                        },
                        {
                            path: '/goods/tour/index',
                            name: 'goods-tour-index',
                            meta: {
                                title: '旅游产品'
                            },
                            component: (resolve) => require(['./views/goods/tour/index'], resolve)
                        },
                        {
                            path: '/goods/sojourn/index',
                            name: 'goods-sojourn-index',
                            meta: {
                                title: '旅居产品'
                            },
                            component: (resolve) => require(['./views/goods/sojourn/index'], resolve)
                        },
                        {
                            path: '/goods/activity/index',
                            name: 'goods-activity-index',
                            meta: {
                                title: '乡村活动'
                            },
                            component: (resolve) => require(['./views/goods/activity/index'], resolve)
                        },
                        {
                            path: '/goods/taxi/index',
                            name: 'goods-taxi-index',
                            meta: {
                                title: '租车服务'
                            },
                            component: (resolve) => require(['./views/goods/taxi/index'], resolve)
                        },
                        {
                            path: '/goods/video/index',
                            name: 'goods-video-index',
                            meta: {
                                title: '视频课程'
                            },
                            component: (resolve) => require(['./views/goods/video/index'], resolve)
                        },
                        {
                            path: '/mch-home/index',
                            name: 'mch-home-index',
                            meta: {
                                title: '商户首页'
                            },
                            component: (resolve) => require(['./views/mall/mch-home/index'], resolve)
                        },
                        {
                            path: '/mall-home/index',
                            name: 'mall-home-index',
                            meta: {
                                title: '商城首页'
                            },
                            component: (resolve) => require(['./views/mall/mall-home/index'], resolve)
                        },
                        {
                            path: '/mall-finance/bill/index',
                            name: 'mall-finance-bill-index',
                            meta: {
                                title: '我的账单'
                            },
                            component: (resolve) => require(['./views/mall/mall-finance/bill/index'], resolve)
                        },
                        {
                            path: '/mall-finance/chart/index',
                            name: 'mall-finance-chart-index',
                            meta: {
                                title: '财务报表'
                            },
                            component: (resolve) => require(['./views/mall/mall-finance/chart/index'], resolve)
                        },
                        {
                            path: '/mall-finance/profit/index',
                            name: 'mall-finance-profit-index',
                            meta: {
                                title: '结算分账'
                            },
                            component: (resolve) => require(['./views/mall/mall-finance/profit/index'], resolve)
                        },
                        {
                            path: '/mall-mch/index',
                            name: 'mall-mch-index',
                            meta: {
                                title: '特约商户'
                            },
                            component: (resolve) => require(['./views/mall/mall-mch/index'], resolve)
                        },
                        {
                            path: '/info/news/index',
                            name: 'news-index',
                            meta: {
                                title: '新闻动态'
                            },
                            component: (resolve) => require(['./views/view-info/news/index'], resolve)
                        },
                        {
                            path: '/info/agreement/index',
                            name: 'agreement-index',
                            meta: {
                                title: '协议管理'
                            },
                            component: (resolve) => require(['./views/view-info/agreement/index'], resolve)
                        },
                        {
                            path: '/info/help/index',
                            name: 'help-index',
                            meta: {
                                title: '相关问题'
                            },
                            component: (resolve) => require(['./views/view-info/help/index'], resolve)
                        },
                        {
                            path: '/info/labour/index',
                            name: 'labour-index',
                            meta: {
                                title: '生活服务'
                            },
                            component: (resolve) => require(['./views/view-info/labour/index'], resolve)
                        },
                        {
                            path: '/info/channel/index',
                            name: 'channel-index',
                            meta: {
                                title: '频道管理'
                            },
                            component: (resolve) => require(['./views/view-info/channel/index'], resolve)
                        },
                        {
                            path: '/goods/group/index',
                            name: 'goods-group-index',
                            meta: {
                                title: '商品分组'
                            },
                            component: (resolve) => require(['./views/goods/group/index'], resolve)
                        },
                        {
                            path: '/system/module/index',
                            name: 'system-module-index',
                            meta: {
                                title: 'APP导航菜单'
                            },
                            component: (resolve) => require(['./views/system/module/index'], resolve)
                        },
                        {
                            path: '/system/adpos-config/index',
                            name: 'system-adpos-config-index',
                            meta: {
                                title: '广告位设置'
                            },
                            component: (resolve) => require(['./views/system/adpos-config/index'], resolve)
                        },
                        {
                            path: '/union-user/villager/index',
                            name: 'union-user-villager-index',
                            meta: {
                                title: '村民'
                            },
                            component: (resolve) => require(['./views/union-user/villager/index'], resolve)
                        },
                        {
                            path: '/union-user/member/index',
                            name: 'union-user-member-index',
                            meta: {
                                title: '会员管理'
                            },
                            component: (resolve) => require(['./views/union-user/member/index'], resolve)
                        },
                        {
                            path: '/union-user/employee/index',
                            name: 'union-user-employee-index',
                            meta: {
                                title: '员工管理'
                            },
                            component: (resolve) => require(['./views/union-user/employee/index'], resolve)
                        },
                        {
                            path: '/village/group/index',
                            name: 'village-group-index',
                            meta: {
                                title: '村组管理'
                            },
                            component: (resolve) => require(['./views/village/group/index'], resolve)
                        },
                        {
                            path: '/househlod/index',
                            name: 'househlod-index',
                            meta: {
                                title: '家庭档案'
                            },
                            component: (resolve) => require(['./views/househlod/index'], resolve)
                        },
                        {
                            path: '/points/config/index',
                            name: 'points-config-index',
                            meta: {
                                title: '积分配置'
                            },
                            component: (resolve) => require(['./views/points/config/index'], resolve)
                        },
                        {
                            path: '/points/audit/index',
                            name: 'points-audit-index',
                            meta: {
                                title: '积分审核'
                            },
                            component: (resolve) => require(['./views/points/audit/index'], resolve)
                        },
                        {
                            path: '/view-info/labourer/index',
                            name: 'labourer-index',
                            meta: {
                                title: '人员档案'
                            },
                            component: (resolve) => require(['./views/view-info/labourer/index'], resolve)
                        },
                        {
                            path: '/village/collective/index',
                            name: 'collective-index',
                            meta: {
                                title: '村集体'
                            },
                            component: (resolve) => require(['./views/village/collective/index'], resolve)
                        },
                        {
                            path: '/system/personal/index',
                            name: 'system-personal-index',
                            meta: {
                                title: '个人信息'
                            },
                            component: (resolve) => require(['./views/system/personal/index'], resolve)
                        },
                        {
                            path: '/shop/category/index',
                            name: 'shop-category-index',
                            meta: {
                                title: '商品分类'
                            },
                            component: (resolve) => require(['./views/shop/category/index'], resolve)
                        },
                        {
                            path: '/shop/logistics/index',
                            name: 'shop-logistics-index',
                            meta: {
                                title: '物流配置'
                            },
                            component: (resolve) => require(['./views/shop/logistics/index'], resolve)
                        },
                        {
                            path: '/mall/mall-order/writeoff',
                            name: 'mall-mall-order-writeoff',
                            meta: {
                                title: '订单核销'
                            },
                            component: (resolve) => require(['./views/mall/mall-order/writeoff'], resolve)
                        },
                        {
                            path: '/mall/mall-order/tour-index',
                            name: 'mall-mall-order-tour-index',
                            meta: {
                                title: '旅游订单'
                            },
                            component: (resolve) => require(['./views/mall/mall-order/tour-index'], resolve)
                        },
                        {
                            path: '/mall/mall-order/activity-index',
                            name: 'mall-mall-order-activity-index',
                            meta: {
                                title: '活动订单'
                            },
                            component: (resolve) => require(['./views/mall/mall-order/activity-index'], resolve)
                        },
                        {
                            path: '/mall/mall-order/video-index',
                            name: 'mall-mall-order-video-index',
                            meta: {
                                title: '视频课订单'
                            },
                            component: (resolve) => require(['./views/mall/mall-order/video-index'], resolve)
                        },
                        {
                            path: '/mall/mall-order/taxi-index',
                            name: 'mall-mall-order-taxi-index',
                            meta: {
                                title: '租车订单'
                            },
                            component: (resolve) => require(['./views/mall/mall-order/taxi-index'], resolve)
                        },
                        {
                            path: '/mall/mall-order/trade-index',
                            name: 'mall-mall-order-trade-index',
                            meta: {
                                title: '分销订单'
                            },
                            component: (resolve) => require(['./views/mall/mall-order/trade-index'], resolve)
                        },
                        {
                            path: '/mall/mall-order/group-index',
                            name: 'mall-mall-order-group-index',
                            meta: {
                                title: '团购订单'
                            },
                            component: (resolve) => require(['./views/mall/mall-order/group-index'], resolve)
                        },
                        {
                            path: '/union-user/unionvip/index',
                            name: 'union-user-unionvip-index',
                            meta: {
                                title: '联合会员'
                            },
                            component: (resolve) => require(['./views/union-user/unionvip/index'], resolve)
                        },
                        {
                            path: '/activity/srv-group/index',
                            name: 'activity-srv-group-index',
                            meta: {
                                title: '社团网点'
                            },
                            component: (resolve) => require(['./views/activity/srv-group/index'], resolve)
                        },
                        {
                            path: '/activity/group-order/index',
                            name: 'activity-group-order-index',
                            meta: {
                                title: '社团订单'
                            },
                            component: (resolve) => require(['./views/activity/group-order/index'], resolve)
                        },
                    ]
                }
            ]
        },

        {
            path: '/login',
            name: 'login',
            meta: {
                title: '系统登录',
                open: true
            },
            component: (resolve) => require(['./views/login.vue'], resolve)
        }
    ]
})